<div id="login-tab" class='bc-tab'>
	<style type="text/css">
		#login-method label
		{margin-right: 8px;text-align: center;cursor: pointer;color:#666;}
		#login-method label i
		{vertical-align: middle;font-size:24px;}
		/*#login-method label span*/
		/*{display: none;}*/
		/*#login-method label.bc-tab-active*/
		/*{background:white;border-radius: 5px;}*/
		#login-method label.bc-tab-active
		{border-bottom: 2px chocolate solid;color:chocolate;}
		/*#login-method label:nth-child(1).bc-tab-active
		{color:maroon;}
		#login-method label:nth-child(2).bc-tab-active
		{color:teal;}
		#login-method label:nth-child(3).bc-tab-active
		{color:chocolate;}
		#login-method label:nth-child(4).bc-tab-active
		{color:dodgerblue;}
		.errormsg
		{height:18px;padding:3px 0px 0px 10px;color:maroon;}*/
		#login-method-wechat-only
		{color:#666;cursor: pointer;}
		#login-method-wechat-only:hover
		{color:chocolate;}
	</style>
	<div id="login-method" class='weui-flex weui-flex-xs bc-tab-menu'>
		<label class='weui-flex__item bc-tab-active' id="login-account-tab">账号密码登录</label>
		<!--<label class='weui-flex__item hidden' id="login-wechat-tab"><i class='i i-scan' ></i> <span>微信</span></label>-->
		<!--<label class='weui-flex__item' id="login-tel-tab" >手机短信注册</label>-->
		<!--<label class='weui-flex__item hidden' id="login-email-tab" ><i class='i i-mail' ></i> <span>邮箱</span></label>-->
	</div>
	<div class='bc-tab-content' style="height:300px;display: flex;align-items:center;">
		<div style="width: 100%">{include file="module:login-account" /}</div>
		<div style="width: 100%">{include file="module:login-wechat" /}</div>
		<div style="width: 100%">{include file="module:login-tel" /}</div>
		<div style="width: 100%;padding-bottom: 40px;">{include file="module:login-email" /}</div>
	</div>
	<br/>
	<!--<div id='login-method-wechat-only' onclick='$("#login-wechat-tab").trigger("click")'>
		<i class='i i-weixin' style="font-size: 20px;vertical-align: middle;" ></i> <span>使用微信授权登录</span> 
	</div>-->
</div>
<script>
	login = {
		init:function(){
			$('.login-vcode-input').on('focus', function(event) {
				if($(".vcode").hasClass('active')) return;
				$(".vcode").addClass('active');
				$(".vcode").attr('src','/vcode')
			});
			$('#login-tab .vcode').on('click', function(event) {
				$(".vcode").addClass('active');
				$(".vcode").attr('src','/vcode')
			});

			$(document).on("login-success",function(){
				INFO.reload("#user-info");
			})

			$("#login-wechat-tab").on('bc-tab-activate',function(){
				login_wechat.newQrcode();
			})
			$("#login-wechat-tab").on('bc-tab-inactivate',function(){
				login_wechat.stop();
			})
			$("#login-account-tab").on('bc-tab-activate',function(){
				setTimeout(function(){
					$("#login-account-input").focus();
				},100)
			})
			$("#login-tel-tab").on('bc-tab-activate',function(){
				setTimeout(function(){
					$("#login-sms-tel").focus();
				},100)
			})
			$("#login-email-tab").on('bc-tab-activate',function(){
				setTimeout(function(){
					$("#login-email-input").focus();
				},100)
			})
		}
	}
	$(function(){
		login.init();
		$("#login-tab .bc-tab-menu .active").trigger("tab-activate")
	})
</script>